home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / sysinfo.h.z / sysinfo.h
C/C++ Source or Header  |  1992-04-03  |  7KB  |  211 lines

  1. /*    Copyright (c) 1984 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. #ifndef __SYS_SYSINFO_H__
  9. #define __SYS_SYSINFO_H__
  10. #ident    "$Revision: 3.12 $"
  11.  
  12. #include "sys/sema.h"
  13.  
  14. /*
  15.  *    System Information.
  16.  */
  17.  
  18. struct sysinfo {
  19.     time_t    cpu[6];
  20. #define    CPU_IDLE    0
  21. #define    CPU_USER    1
  22. #define    CPU_KERNEL    2
  23. #define    CPU_WAIT    3
  24. #define CPU_SXBRK    4
  25. #define CPU_INTR    5
  26.     time_t    wait[5];
  27. #define    W_IO    0
  28. #define    W_SWAP    1
  29. #define    W_PIO    2
  30. #define    W_GFXC    3
  31. #define    W_GFXF    4
  32.     unsigned long    bread;
  33.     unsigned long    bwrite;
  34.     unsigned long    lread;
  35.     unsigned long    lwrite;
  36.     unsigned long    phread;
  37.     unsigned long    phwrite;
  38.     unsigned long    swapin;
  39.     unsigned long    swapout;
  40.     unsigned long    bswapin;
  41.     unsigned long    bswapout;
  42.     unsigned long    pswapout;
  43.     unsigned long    pswitch;
  44.     unsigned long    syscall;
  45.     unsigned long     remcall;    /* REMOTE: remote call */
  46.     unsigned long   fileop;        /* REMOTE: remote fileop */
  47.     unsigned long   serve;        /* REMOTE: remote server */
  48.     unsigned long    sysread;
  49.     unsigned long    syswrite;
  50.     unsigned long    sysfork;
  51.     unsigned long    sysexec;
  52.     unsigned long    runque;
  53.     unsigned long    runocc;
  54.     unsigned long    swpque;
  55.     unsigned long    swpocc;
  56.     unsigned long    iget;
  57.     unsigned long    namei;
  58.     unsigned long    dirblk;
  59.     unsigned long    readch;
  60.     unsigned long    writech;
  61.     unsigned long    rcvint;
  62.     unsigned long    xmtint;
  63.     unsigned long    mdmint;
  64.     unsigned long    rawch;
  65.     unsigned long    canch;
  66.     unsigned long    outch;
  67.     unsigned long    msg;
  68.     unsigned long    sema;
  69.     unsigned long    pnpfault;
  70.     unsigned long    wrtfault;
  71.     unsigned long    ptc;        /* pty controller character count */
  72.     unsigned long    pts;        /* pty slave character count */
  73.     unsigned long    gswitch;    /* # of graphics context switches */
  74.     unsigned long    gintr;        /* # of gm interrupts */
  75.     unsigned long    gswapbuf;    /* # of swap buffers calls */
  76.     unsigned long    griioctl;    /* # of griioctl calls */
  77.     unsigned long    fifowait;    /* fifo interrupts that block */
  78.     unsigned long    fifonowait;    /* fifo interrupts that don't block */
  79.     unsigned long    intr_svcd;    /* interrupts serviced */
  80.     unsigned long    vmeintr_svcd;    /* vme interrupts serviced */
  81. };
  82.  
  83. extern struct sysinfo sysinfo; 
  84.  
  85. struct syswait {
  86.     sema_t    iowait;
  87.     sema_t    swap;
  88.     sema_t    physio;
  89. };
  90.  
  91. struct dinfo {
  92.             /* ELEMENT FOR sar -Du */
  93.     time_t    serve;        /* ticks in serve() since boot */
  94.             /* ELEMENTS FOR sar -Dc */
  95.     unsigned long    isyscall;    /* # of incoming syscalls since boot */
  96.     unsigned long    isysread;    /* # of incoming read's since boot */
  97.     unsigned long    ireadch;    /* char's read by incoming read's */
  98.     unsigned long    isyswrite;    /* # of incoming write's since boot */
  99.     unsigned long    iwritech;    /* char's written by incoming writes */
  100.     unsigned long    isysexec;    /* # of incoming exec's since boot */
  101.     unsigned long    osyscall;    /* # of outgoing syscalls since boot */
  102.     unsigned long    osysread;    /* # of outgoing read's since boot */
  103.     unsigned long    oreadch;    /* char's read by outgoing read's */
  104.     unsigned long    osyswrite;    /* # of outgoing write's since boot */
  105.     unsigned long    owritech;    /* char's written by outgoing writes */
  106.     unsigned long    osysexec;    /* # of outgoing exec's since boot */
  107.             /* ELEMENTS FOR sar -S*/
  108.     unsigned long    nservers;    /* sum of all servers since boot */
  109.     unsigned long    srv_que;    /* sum of server Q lgth since boot */
  110.     unsigned long    srv_occ;    /* ticks server Q found occupied */
  111.     unsigned long    rcv_que;    /* sum of receive Q lgth since boot */
  112.     unsigned long    rcv_occ;    /* clock ticks receive Q occupied */
  113. };
  114.  
  115. struct rcinfo {
  116.     unsigned long    cbread;        /* read blocks sent to remote server*/
  117.                     /* (not found in cache) */
  118.     unsigned long    cbwrite;    /* write blocks not found in local cache*/
  119.     unsigned long    clread;        /* total blocks in remote read */
  120.     unsigned long    clwrite;    /* total blocks in remote write */
  121.     unsigned long    snd_dis;    /* cache disable messages sent (server) */
  122.     unsigned long    snd_msg;    /* total RFS messages sent */
  123.     unsigned long    rcv_dis;    /* cache disable messages received (client) */
  124.     unsigned long    rcv_msg;    /* total RFS messages received */
  125.     unsigned long    dis_bread;    /* # of per-file blocks flushed from cache*/
  126.     unsigned long    blk_inval;    /* # of per-file blocks flushed from cache*/
  127.     unsigned long    inval;        /* # of per-file cache flushes */
  128. };
  129. extern struct dinfo dinfo;
  130. extern struct rcinfo rcinfo;
  131. extern    int minserve;        /* DU tunable: sever low water mark */
  132. extern    int maxserve;        /* DU tunable: sever high water mark */
  133. extern    int nservers;        /* total servers in system */
  134. extern    int idleserver;        /* idle servers in system */
  135. extern    int msglistcnt;        /* receive descriptors in msg queue */
  136.  
  137.  
  138. struct minfo {
  139.     unsigned long    freemem[2];     /* freemem in pages */
  140.                     /* "double" unsigned long format*/
  141.                     /* freemem[0] least significant */
  142.     unsigned long    freeswap;    /* free swap space */
  143.     unsigned long    vfault;      /* translation fault */
  144.     unsigned long    demand;        /*  demand zero and demand fill pages */
  145.     unsigned long    swap;        /*  pages on swap */
  146.     unsigned long    cache;        /*  pages in cache */
  147.     unsigned long    file;        /*  pages on file */
  148.     unsigned long    pfault;        /* protection fault */
  149.     unsigned long    cw;        /*  copy on write */
  150.     unsigned long    steal;        /*  steal the page */
  151.     unsigned long    freedpgs;    /* pages are freed */
  152.     unsigned long    unmodsw;    /* getpages finds unmodified pages */
  153.                     /* on swap */
  154.     unsigned long    unmodfl;    /* getpages finds unmodified pages */
  155.                     /* in file */ 
  156.     unsigned long    tlbpids;    /* new tlbpids assigned */
  157.     unsigned long    tfault;        /* double tlb miss */
  158.     unsigned long    rfault;        /* reference bit vfault */
  159.     unsigned long    tlbflush;    /* entire tlb flushed on a processor */
  160.     unsigned long    tlbsync;    /* site-wide tlb flushes */
  161.     unsigned long    tvirt;        /* flush caused by virtual address */
  162.                     /* depletion */
  163.     unsigned long    tphys;        /* tlb invalidation caused by */
  164.                     /* changing virt/phys association */
  165.     unsigned long    twrap;        /* flush caused by tlbpid wrap */
  166.     unsigned long    tdirt;        /* tlbs marked stale for process */
  167.                     /* on another processor (MP only) */
  168.     unsigned long    heapmem;    /* total memory allocated to heap */
  169.     unsigned long     halloc[2];    /* heap-malloc in bytes */
  170.                     /* "double" unsigned long format*/
  171.     unsigned long     hrnd[2];    /* heap-malloc roundings in bytes */
  172.     unsigned long     hfree[2];    /* heap-malloc frees in bytes */
  173.     unsigned long    hovhd;        /* heap headers and such */
  174.     unsigned long    hunused;    /* unallocated heap blocks */
  175.     unsigned long     hreq[2];    /* requests to kern malloc */
  176.     unsigned long     hnblks[2];    /* blocks searched per request */
  177. };
  178.  
  179. #ifdef _KERNEL
  180.  
  181. extern struct minfo minfo;
  182. extern struct syswait syswait;
  183.  
  184. struct syserr {
  185.     unsigned long    inodeovf;
  186.     unsigned long    fileovf;
  187.     unsigned long    textovf;
  188.     unsigned long    procovf;
  189. };
  190.  
  191. /* ksa must come after syserr */
  192. #include "sys/ksa.h"
  193.  
  194. extern struct syserr syserr;
  195.  
  196. struct shlbinfo {
  197.     unsigned long    shlbs;    /* Max # of libs a process can link in    */
  198.                 /*   at one time.            */
  199.     unsigned long    shlblnks;/* # of times processes that have used    */
  200.                 /*   static shared libraries.        */
  201.     unsigned long    shlbovf;/* # of processes needed more shlibs    */
  202.                 /*   than the system imposed limit.    */
  203.     unsigned long    shlbatts;/* # of times processes have attached    */
  204.                 /*   run time libraries.        */
  205. };
  206.  
  207. extern struct shlbinfo shlbinfo;
  208.  
  209. #endif /* _KERNEL */
  210. #endif /* __SYS_SYSINFO_H__ */
  211.